package com.seecen.controller;

import com.seecen.common.BaseResponse;
import com.seecen.pojo.entity.RepairType;
import com.seecen.service.RepairTypeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/repair")
public class RepairTypeController {

    @Autowired
    private RepairTypeService repairTypeService;

    @GetMapping("/types")
    public BaseResponse<List<RepairType>> getRepairTypes() {
        log.info("获取维修类型列表");
        return repairTypeService.getRepairTypes();
    }
}